using System;
using System.Collections.Generic;
using System.Text;
using PetShop.Domain.Model;
using PetShop.Infrastructure.Gateways;

namespace PetShop.Domain.Services
{
    public class AccountService
    {

        private readonly AccountGateway _gateway;

     

        public AccountService()
        {
            _gateway = new AccountGateway();
        }

      
        public Account GetAccount(string userId, string password)
        {
            return this._gateway.GetAccount(userId, password);
        }

        
        public void RegisterAccount(Account aAccount)
        {
            aAccount.Validate();
            _gateway.Insert(aAccount);
        }


        public void UpdateInfo(Account aAccount)
        {
            aAccount.Validate();
            _gateway.Update(aAccount);
        }


    }
}
